﻿using AspNetIdentity.Models;
using IdentityServerHost.Quickstart.UI;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;

namespace AspNetIdentity.Api
{
    [Route("/api/test")]
    [Authorize]//(AuthenticationSchemes = IdentityServerConstants.LocalApi.AuthenticationScheme)]
    public class TestController : ControllerBase
    {
        public ResultMessageModel<LoginInputModel> Get()
        {
            var model = new ResultMessageModel<LoginInputModel>();
            var input = new LoginInputModel()
            {
                Username = "张三",
                Password = "1233",
                RememberLogin = true,
                ReturnUrl = "http:"
            };
            model.response = input;
            //var claims = User.Claims.Select(c => new { c.Type, c.Value });
            //return new JsonResult(claims);
            return model;
        }
    }
}